<template>
  <div>
    <div class="actionBar">
      <el-button
        type="primary"
        icon="el-icon-caret-top"
        size="mini"
        class="agree"
        >赞同 55</el-button
      >
      <el-button
        type="primary"
        icon="el-icon-caret-bottom"
        size="mini"
        class="disagree"
      ></el-button>
      <span class="iconItem"
        ><span class="iconfont">&#xe620;</span> 收起评论</span
      >
      <span class="iconItem"><span class="iconfont">&#xe621;</span> 收藏</span>
    </div>

    <div class="commentArea">
      <div class="commentTitle">8 条评论</div>
      <el-divider class="dividingLine"></el-divider>

      <div class="commentItem">
        <div class="commentItemBox">
          <div class="comItemTop">
            <div class="comItemTopLeft">
              <el-avatar
                size="small"
                src="https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png"
              ></el-avatar>
              <div class="comItemTopName">用户名</div>
            </div>
            <div class="comItemTopRight">1 小时前</div>
          </div>

          <div class="comItemContent">
            这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容
          </div>
          <div class="comItemBottom">
            <span class="comItemBottomIcon1"
              ><span class="iconfont">&#xe605;</span> 3</span
            >
            <span class="comItemBottomIcon"
              ><span class="iconfont">&#xe6b8;</span> 踩</span
            >
            <span class="comItemBottomIcon"
              ><span class="iconfont">&#xe600;</span> 回复</span
            >
          </div>
          <el-divider class="replyLine"></el-divider>

          <!-- //这是子评论 -->
          <div class="reply" v-for="(item, index) in 5" :key="index">
            <div class="commentItemBox">
              <div class="comItemTop">
                <div class="comItemTopLeft">
                  <el-avatar
                    size="small"
                    src="https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png"
                  ></el-avatar>
                  <div class="comItemTopName">用户名</div>
                </div>
                <div class="comItemTopRight">1 小时前</div>
              </div>

              <div class="comItemContent">
                这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容
              </div>
              <div class="comItemBottom">
                <span class="comItemBottomIcon1"
                  ><span class="iconfont">&#xe605;</span> 3</span
                >
                <span class="comItemBottomIcon"
                  ><span class="iconfont">&#xe6b8;</span> 踩</span
                >
                <span class="comItemBottomIcon"
                  ><span class="iconfont">&#xe600;</span> 回复</span
                >
              </div>
              <el-divider class="replyLine"></el-divider>
            </div>
          </div>
        </div>
      </div>

      <el-divider class="dividingLine"></el-divider>
      <div class="commentInput">
        <el-input placeholder="请输入内容" clearable></el-input>
        <el-button type="primary" class="commentSend">发送</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="scss" scoped>
.iconfont {
  font-size: 14px !important;
}
.actionBar {
  margin-top: 30px;
  .agree {
    background: #e5f2ff;
    color: #0084ff;
    border: #e5f2ff 1px solid;
    &:hover {
      background: #d9edff;
    }
  }
  .disagree {
    background: #e5f2ff;
    color: #0084ff;
    border: #e5f2ff 1px solid;
    padding: 7px 7px;
    margin-left: 5px;
    &:hover {
      background: #d9edff;
    }
  }
  .iconItem {
    margin-left: 20px;
    color: #8590a6;
    line-height: 15px;
    font-size: 15px;
    &:hover {
      cursor: pointer;
    }
  }
}
.commentArea {
  width: 98%;
  margin: 20px auto;
  border: 1px solid #efefef;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  .commentTitle {
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
  }
  .dividingLine {
    margin: 0;
  }
  .commentItem {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    .commentItemBox {
      width: 100%;
      .replyLine {
        margin: 10px 0;
      }
      .comItemTop {
        display: flex;
        justify-content: space-between;
        line-height: 28px;
        .comItemTopLeft {
          display: flex;
          &:hover {
            cursor: pointer;
          }
          .comItemTopName {
            font-size: 15px;
            color: #525252;
            margin-left: 8px;
            font-weight: 550;
          }
        }
        .comItemTopRight {
          color: #8590a6;
          font-size: 15px;
        }
      }
      .comItemContent {
        margin-left: 30px;
        margin-top: 5px;
      }
      .comItemBottom {
        margin-left: 30px;
        margin-top: 8px;
        color: #8590a6;
        font-size: 15px;
        .comItemBottomIcon1:hover {
          cursor: pointer;
        }
        .comItemBottomIcon {
          margin-left: 28px;
          &:hover {
            cursor: pointer;
          }
        }
      }
      .reply {
        margin-left: 30px;
      }
    }
  }
  .commentInput {
    padding: 10px;
    display: flex;
    .commentSend {
      margin-left: 20px;
      background: #1d2f70;
      &:hover {
        background: rgb(53, 89, 180);
      }
    }
  }
}
</style>
